package com.qingfeng.music.ui.main.contract;

import com.qingfeng.music.dao.Music;
import com.shuji.android.library.BaseModel;
import com.shuji.android.library.BasePresenter;
import com.shuji.android.library.BaseView;

import java.util.List;

import rx.Observable;

/**
 * 本地歌曲 mvp 约定
 *
 * Created by Ganlin.Wu on 2016/10/13.
 */
public interface LocalMainContract {


    //model
    interface Model extends BaseModel {
        /**
         * 取得歌曲数据
         *
         * @return
         */
        Observable<List<Music>> getLocalMusics();
    }

    //view
    interface View extends BaseView {
        /**
         * 显示歌曲
         *
         * @param musics
         */
        void showMusicList(List<Music> musics);
    }

    //presenter
    abstract class Presenter extends BasePresenter<View, Model> {

        /**
         * 通知 界面( view )本地歌曲列表准备好了，更新界面
         *
         */
        public abstract void loadLocalMusics();
    }
}
